{include file="layout/header" title="分配权限" /}
<div class="view-body">
    {include file="layout/menu" /}
    <div class="view-product">
        <div class="company_identify">
            <div class="manage-head">
                <h6 class="padding-left manage-head-con">
                    清除缓存
                </h6>
            </div>
            <form action="{:url('admin/Tool/clearCache')}" class="layui-form" method="post" style="margin: 20px 15px;">
                <div class="layui-form-item">
                    <div class="layui-input-block" style="margin-left: 20px;">
                        <input name="app" title="应用缓存" type="checkbox" value="1">
                        </input>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-input-block" style="margin-left: 20px;">
                        <input name="tpl" title="模版缓存" type="checkbox" value="1">
                        </input>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-input-block" style="margin-left: 20px;">
                        <input name="log" title="运行日志" type="checkbox" value="1">
                        </input>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-input-block" style="margin-left: 20px;">
                        <button class="layui-btn layui-btn-warm" id="selectAll">
                            全选
                        </button>
                        <button class="layui-btn layui-btn-normal" type="submit">
                            确定
                        </button>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
<script type="text/javascript">
    layui.use(['form','layer'], function(){
        var $ = layui.jquery;
        var layer = layui.layer;

        $("#selectAll").click(function(){
            if($(this).text() == "全选"){
                $(":checkbox").attr("checked",true);
                $(":checkbox").next().addClass("layui-form-checked");
                $(this).text("反选");
            }else{
                $(":checkbox").attr("checked",false);
                $(":checkbox").next().removeClass("layui-form-checked");
                $(this).text("全选");
            }
            return false;
        });

      });
</script>
{include file="layout/footer" /}
